import router from './router'
import store from './store'
router.beforeEach((to, from, next) => {
    document.title = to.meta.title
    const token = store.state.user.user.token
    if (token || to.name == 'login') {
        next()
    } else {
        next({ path: '/login', query: { redirect: to.path } })
    }
})
export default {}